home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Simulation / PDP-8 Simulator / Source Code / EditGlobalEqu.p next >
Encoding:
Text File  |  1992-09-13  |  2.6 KB  |  69 lines  |  [TEXT/KAHL]

  1. #ifndef NIL
  2. #define        NIL 0L
  3. #endif
  4. #ifndef standardResID
  5. #define        standardResID    128
  6. #endif
  7.  
  8. typedef struct
  9. {
  10.     struct line    **nextLine;        /* handle to following link, or NIL */
  11.     struct line    **lastLine;        /* handle to preceeding link, or NIL */
  12.     Str255  theLine;            /* the characters on the line */
  13. }line, *linePtr, **lineHdl;
  14.  
  15. /* note that last field is allocated dynamically- contains only the number of bytes
  16.     required to hold the string plus the length count in position 0. DO NOT ACCESS
  17.     this field unless you are using the routines provided to get it- you will fail! */
  18.  
  19. typedef struct
  20. {
  21.     Handle            undoBuffer;            /* handle to undo data */
  22.     int                undoWhat;            /* what to undo (indicates type) */
  23.     int                uSelStart;            /* selection start position */
  24.     int                uSelEnd;            /* selection end */
  25.     int                uLineID;            /* line to be undone */
  26.     int                uNLines;            /* number of lines in multiple undo */
  27.     int                undoFlags;            /* various flags, used internally */
  28. }
  29. undoRec, *undoPtr, **undoHdl;
  30.  
  31.     
  32. typedef struct
  33. {
  34.     lineHdl             listHead;            /* handle to line 1 */
  35.     lineHdl             listTail;            /* handle to last line */
  36.     int                linesSelected;        /* number of lines highlighted apart from current */
  37.     int                 endSelChar;            /* character offset of selection end */
  38.     int                 lineHeight;            /* lineheight of current font */
  39.     int                 descent;            /* descent of current font */
  40.     int                mSpace;                /* width of 'm' character in pixels for font */
  41.     int                 nLines;                /* number of lines in record */
  42.     int                 curEdLin;            /* which line contains cursor */
  43.     int                topLine;            /* first line shown in window */
  44.     int                linesInWindow;        /* num visible lines in window */
  45.     int                charsAcross;        /* num visible 'm' spaces across window */
  46.     WindowPtr         owner;                /* pointer to window owning this record */
  47.     ControlHandle    vScroll;            /* copy of vertical bar handle */
  48.     ControlHandle    hScroll;            /* copy of horizontal bar handle */
  49.     TEHandle        lineEditRec;        /* handle to textedit for line being edited */
  50.     undoHdl            undoData;            /* Handle to info for undoing things */
  51.     int                tabHeight;            /* height of tab bar- set to 0 to hide it */
  52.     int                tabs[10];            /* character positions of tabs set */
  53.     SFReply            asmFile;            /* file to be assembled */
  54.     long            hiliteLine;            /* highlighted line, 0 means no highlight */
  55. } textRecord, *textEdPtr, **textEdHdl;
  56.  
  57. #define     EditWindowKind    11        /* kind ID for editor windows */
  58. #define        TabBarHeight    28        /* height of tab ruler bar in window subframe */
  59.  
  60. #define        cantUndo        -1
  61. #define        undoTyping        0
  62. #define        undoClear        1
  63. #define        undoPaste        2
  64. #define        undoReformat    3
  65. #define        undoTabs        4
  66. #define        undoLineDelete    5
  67. #define        undoLineInsert    6
  68.  
  69.